﻿#pragma once
// Copyright (c) lanyeo 2020-2021
// Licenced under MIT license. See https://opensource.org/licenses/MIT for details.
// code style
// 1. use forward declaration (尽可能使用前置声明)
// 2. include file sequence [other project>c>c++>third>self project]
// 

#include "network_node.h"

class INetworkManager;

class CNetworkPeer : public CNetworkNode
{
public:
    explicit CNetworkPeer(INetworkManager* network, asio::io_service* io_service, std::string ip, uint16_t port);
    virtual ~CNetworkPeer();
    void Connect();
    bool canDel() override;
private:
    std::string m_ip;
    uint16_t m_port;
    bool m_try_connect;
};
